function init(){
	submitUpdateForm('.btn-submit-update', evtAfterBuyPacket);
}

function evtAfterBuyPacket(data){
	if(data.code==1){
		var newRow = $('#tbpacket thead tr.tr-temp').clone().removeClass('hidden').removeClass('tr-temp');

		var index = $('#tbpacket tbody tr').length + 1;
		newRow.find('th.index').html(index);

		var option = $('#packet-list option:selected');
		newRow.find('th.title').html(option.attr('data-text'));
		newRow.find('th.product-count').html(option.attr('data-value'));

		newRow.find('td.created-at').html(data.packet.created_at);

		$('#tbpacket tbody').append(newRow);
	}
}